package celiasoft.itasalib.query;

import celiasoft.itasalib.filegatherer.XMLGatherer;
import celiasoft.itasalib.query.resultparser.IQueryResultParser;
import celiasoft.itasalib.query.resultparser.QueryAllShowSubsResultParser;
import celiasoft.itasalib.staticdata.ItasaStaticUrls;
import celiasoft.itasalib.structures.SubsVersion;

public class AllPageShowSubsQuery extends Query {

	private int _page = 1;
	private int _id;
	private SubsVersion _version;

	public AllPageShowSubsQuery(XMLGatherer gatherer, String apikey) {
		super(gatherer, apikey);
	}

	@Override
	protected String getQueryUrl() {
		return String.format(ItasaStaticUrls.SHOWS_SUBS_LIST_URL, getAPIKey(), this._id, this._version.getLabel(), this._page );
	}

	public int getPage(){
		return this._page;
	}
	
	public void setPage(int page){
		this._page = page;
	}
	
	public int getShowId(){
		return this._id;
	}
	
	public void setShowId(int showId){
		this._id = showId;
	}
	
	public SubsVersion getSubsVersion(){
		return this._version;
	}
	
	public void setSubsVersion(SubsVersion version){
		this._version = version;
	}
	
	
	@Override
	protected IQueryResultParser getResultParser() {
		
		return new QueryAllShowSubsResultParser();
	}

	
}
